Skip to content

feat(sdk-core): canton end-investor offboarding and invite-cancel intents (CHALO-2278) - #10243

Open
hrishikeshjain wants to merge 1 commit into
masterfrom
hrishikeshjain/chalo-2278-canton-offboarding-intents
Open

hrishikeshjain wants to merge 1 commit into
masterfrom
hrishikeshjain/chalo-2278-canton-offboarding-intents

Conversation

@hrishikeshjain

Copy link
Copy Markdown
Contributor

What

sdk-core pass-through plumbing for two new DTCC Canton intents, cantonEndInvestorOffboarding and cantonEndInvestorOnboardingCancel (BitGo/public-types#504), mirroring the existing onboarding intents exactly.

Linear: CHALO-2278

Why no new TransactionType / builder

Verified on master: wallet-platform wraps IMS-prepared onboarding transactions in the SDK's CantonCommandBuilder, so they decode, explain, verify and sign as TransactionType.CantonCommand. Offboarding/cancel take the same path — nothing changes in sdk-coin-canton. verifyCantonCommandTransaction stays lenient (no cantonCommandParams), same as onboarding.

Changes (all modules/sdk-core)

  • utils/mpcUtils.ts: cantonEndInvestorOnboardingCancel added to the canton txRequestId-required assert list; cantonEndInvestorOffboarding asserts endInvestorPartyId (mirrors the offer intent); both added to the no-recipients-required list.
  • utils/tss/recipientUtils.ts: both added to intentsWithoutRecipients (+ the mirrored lists in its test).
  • wallet/wallet.ts: two prebuildTransaction cases — cancel mirrors accept (forwards txRequestId, sequenceId = txRequestId); offboarding mirrors offer (validates and forwards endInvestorPartyId).
  • wallet/iWallet.ts / utils/tss/baseTypes.ts: endInvestorPartyId doc comments extended (field already exists; params.type and intentType are plain strings, no unions to extend).

Semantics worth noting for review

Cancel is signed by the participant's wallet (it exercises the participant-controlled EndInvestorOnboardingOffer_Cancel/Request_Cancel), whereas accept/reject are signed by the end investor's wallet — so retail/WP callers invoke it on the participant wallet, same as offboarding.

Testing

  • yarn build (full sdk-core tsc) clean.
  • recipientUtils unit tests: 52 passing (both mirrored lists updated).
  • eslint on changed files: 0 errors; prettier clean.
  • mpcUtils.canton.ts could not load locally (native @bitgo/secp256k1 skipped by --ignore-scripts install) — it only covers Broadridge; CI runs it.

Related

public-types: BitGo/public-types#504 · IMS: BitGo/indexerdb-microservice#2430 · indexer: BitGo/indexer#9844, BitGo/indexer#9845

🤖 Generated with Claude Code

… intents

Pass-through plumbing for the two new DTCC intents (public-types #504),
mirroring the existing onboarding intents exactly:

- cantonEndInvestorOffboarding: requires endInvestorPartyId (mirrors the
  offer intent); the prepared transaction is built server-side by
  WP/IMS, which discovers the Daml existingContracts lists from the ACS.
- cantonEndInvestorOnboardingCancel: requires txRequestId referencing
  the stored pending offer (mirrors accept/reject); unlike those it is
  signed by the participant's wallet.

No new TransactionType and nothing in sdk-coin-canton: WP wraps
IMS-prepared transactions in the SDK CantonCommandBuilder, so decode,
explain, verify and signing already handle these as CantonCommand.

Hooks were bypassed for this commit (husky shim absent in a worktree
installed with --ignore-scripts); prettier and eslint were run manually
on the changed files instead.

TICKET: CHALO-2278

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

CHALO-2278

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

@hrishikeshjain
hrishikeshjain marked this pull request as ready for review November 26, 2026 06:10
@hrishikeshjain
hrishikeshjain requested review from a team as code owners November 26, 2026 06:10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants